import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

import entry from 'components/entry/index'

import application from 'components/application/index'
import applicationDetail from 'components/application/detail'
import overview from 'components/application/overview'
import channel from 'components/application/channel'
import applyChannel from 'components/application/apply-channel'
import order from 'components/application/order'
import capital from 'components/application/capital'
import notice from 'components/application/notice'

import account from 'components/account/index'
import info from 'components/account/info'
import pwd from 'components/account/pwd'
import subAccount from 'components/account/sub-account'


export default new Router({
  routes: [
    {
      path: '/',
      name: 'entry',
      component: entry
    },
    {
    	path:'/application',
    	name:'application',
    	component:application
    },
    {
      path:'/account',
      name:'account',
      component:account,
      children:[
        {
          path:'info',
          name:'info',
          component:info
        },{
          path:'pwd',
          name:'pwd',
          component:pwd
        },
        {
          path:'subAccount',
          name:'sub-account',
          component:subAccount
        }
      ]
    },
    {
    	path:'/application/:id/detail',
    	name:'application-detail',
    	component:applicationDetail,
      children:[
        {
          path:'overview',
          name:'overview',
          component:overview
        },
        {
          path:'channel',
          name:'channel',
          component:channel
        },
        {
          path:'applyChannel',
          name:'apply-channel',
          component:applyChannel
        },
        {
          path:'order',
          name:'order',
          component:order
        },
        {
          path:'capital',
          name:'capital',
          component:capital
        },
        {
          path:'notice',
          name:'notice',
          component:notice
        }
      ]
    }
  ]
})
